package com.hust.query.dian;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.animation.Animation;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;

import java.util.HashMap;

public class BaseActivity extends AppCompatActivity {

	protected ImageView leftIcon, rightIcon;
	protected Button backBtn, rightBtn, floatBtn;
	protected LinearLayout ll_constact_serach, empty_view;
	protected TextView title;
	protected CMApplication cApp = null;
	protected Handler mHandler;
	protected HashMap<String, String> postParamMap;

	protected PopupWindow m_popupWindow;
	protected View subview2,blankView;
	protected TextView allBtn, cancelBtn;
	protected EditText searchContent;
	protected ListView popList;
	protected Animation anim = null;

	protected int everyPageNum = 20;    //每页加载的item数
	protected int pageNoHeTong = 0;     //合同列表的当时页数
	
	
	protected final int Handler_Message_Refresh_Data     =      1;
	protected final int Handler_Message_Swipe_Stop       =      2;
	protected final int Handler_Message_Search           =      3;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
//		setContentView(R.layout.base_layout);

		cApp = (CMApplication) getApplication();
		postParamMap = new HashMap<String, String>();
	}


	protected String getStringExtra(final String name) {
		return getIntent().getStringExtra(name);
	}

	public void backFinish(View view) {
		finish();
	}

	public void hidePopDialog(){
		if ( m_popupWindow != null && m_popupWindow.isShowing() )
			m_popupWindow.dismiss();
	}

    public void hidePopList(){
        popList.setVisibility(View.VISIBLE);
        blankView.setVisibility(View.GONE);
    }


}
